package com.whcoding.test.annotion;

import com.whcoding.test.common.validator.InConstraintValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-08-01 15:39
 **/
// 这里写校验器 InConstraintValidator
@Constraint(validatedBy = {InConstraintValidator.class})
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface InConstraint {
	String[] value();
	String message();
	Class<?>[] groups() default {};
	Class<? extends Payload>[] payload() default {};
}